/**
 * @Author: LongTao
 * @program: day04_longtao_springmvc_1917JA_20210108
 * @description: 链表查询接口
 * @create: 2021-01-12 08:37
 * @version:1.0
 **/
package com.springmvc.longtao.smbms.mapper;

import com.springmvc.longtao.smbms.pojo.UserAndRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserAndRoleMapper {
    /**
     * 分页查询
     * @param queryUserName
     * @param queryUserRole
     * @param currentPageNo
     * @param pageSize
     * @return
     */
    public List<UserAndRole> queryAll(@Param("queryUserName") String queryUserName,@Param("queryUserRole") Integer queryUserRole, @Param("currentPageNo") Integer currentPageNo, @Param("pageSize") Integer pageSize);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    public UserAndRole queryID(@Param("id") String id);

    /**
     * 条件查询总数
     * @param queryUserName
     * @param queryUserRole
     * @return
     */
    public int getUserCount(@Param("queryUserName") String queryUserName, @Param("queryUserRole") Integer queryUserRole);

    /**
     * 根据code查询用户
     * @param userCode
     * @return
     */
    public UserAndRole queryUserCode(@Param("userCode") String userCode);
}
